package com.zzq.controller;


import com.zzq.domain.entity.SmileShootAddress;
import com.zzq.domain.search.ShootAddressApplySearchParamet;
import com.zzq.domain.search.ShootAddressSearchParamet;
import com.zzq.result.SmileResult;
import com.zzq.service.ShootAdressAdminService;
import com.zzq.service.ShootAdressApplyAdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/admin/shoot/address")
@RestController
@Api(value = "拍摄地址管理",tags = {"拍摄地址管理"})
public class ShootAddressAdminController {

    @Autowired
    private ShootAdressAdminService shootAdressAdminService;



    @PostMapping("/list")
    @ApiOperation("获取拍摄集合")
    public SmileResult list(@RequestBody ShootAddressSearchParamet searchParamet){
      return   shootAdressAdminService.getShootAdresslist(searchParamet);
    }




    @GetMapping("/del")
    @ApiOperation("删除拍摄地")
    public SmileResult del(@RequestParam("shootAddressId") Long   shootAddressId){
       return shootAdressAdminService.delShootAdressById(shootAddressId);
    }

    @GetMapping("/audit")
    @ApiOperation("审核")
    public SmileResult setAudit(@RequestParam("shootAddressId") Long   shootAddressId, @RequestParam("audit") Boolean   isby){
        return shootAdressAdminService.setAudit(shootAddressId,isby);
    }

}
